function [residual, g1, g2, g3] = endog_baseline_dynamic(y, x, params, steady_state, it_)
%
% Status : Computes dynamic model for Dynare
%
% Inputs :
%   y         [#dynamic variables by 1] double    vector of endogenous variables in the order stored
%                                                 in M_.lead_lag_incidence; see the Manual
%   x         [M_.exo_nbr by nperiods] double     matrix of exogenous variables (in declaration order)
%                                                 for all simulation periods
%   params    [M_.param_nbr by 1] double          vector of parameter values in declaration order
%   it_       scalar double                       time period for exogenous variables for which to evaluate the model
%
% Outputs:
%   residual  [M_.endo_nbr by 1] double    vector of residuals of the dynamic model equations in order of 
%                                          declaration of the equations
%   g1        [M_.endo_nbr by #dynamic variables] double    Jacobian matrix of the dynamic model equations;
%                                                           columns: equations in order of declaration
%                                                           rows: variables in order stored in M_.lead_lag_incidence
%   g2        [M_.endo_nbr by (#dynamic variables)^2] double   Hessian matrix of the dynamic model equations;
%                                                              columns: equations in order of declaration
%                                                              rows: variables in order stored in M_.lead_lag_incidence
%   g3        [M_.endo_nbr by (#dynamic variables)^3] double   Third order derivative matrix of the dynamic model equations;
%                                                              columns: equations in order of declaration
%                                                              rows: variables in order stored in M_.lead_lag_incidence
%
%
% Warning : this file is generated automatically by Dynare
%           from model file (.mod)

%
% Model equations
%

residual = zeros(79, 1);
T43 = params(11)*exp(y(62))*exp(y(30))^(1-params(8))*exp(y(37))^params(8);
T74 = exp(y(1))*exp(y(48))/exp(y(9));
T76 = T74*y(59);
T81 = exp(y(29))*exp(y(116))/exp(y(48));
T97 = 1/params(6);
T104 = T97*1/exp(y(50))*exp(y(38));
T109 = exp(y(37))/exp(y(30));
T123 = exp(y(1))*exp(y(37))/exp(y(4));
T125 = T123*y(61);
T130 = exp(y(29))*exp(y(110))/exp(y(37));
T144 = exp(y(113))*params(7)*params(31)*params(30)*exp(y(37))^params(17);
T159 = exp(y(7))/exp(y(1));
T166 = exp(y(42))^(1-params(2));
T191 = exp(y(1))^(-1);
T214 = (params(6)-1)/params(6);
T216 = (1-params(2))*1/exp(y(50))*T214;
T218 = T216*exp(y(38))/exp(y(42));
T232 = exp(y(1))*exp(y(45))/exp(y(8));
T234 = T232*y(57);
T239 = exp(y(29))*exp(y(115))/exp(y(45));
T255 = params(2)*exp(y(29))*(params(6)-1)*exp(y(111))/(params(6)*exp(y(43))*exp(y(117)));
T265 = params(14)/2;
T274 = params(15)/2;
T282 = params(16)/2;
T303 = exp(y(10))^params(37)*params(36)^(1-params(37));
T321 = exp(y(51))*exp(y(66))/(exp(y(66))-1)*exp(y(53))/exp(y(54));
T329 = params(1)*params(26)*exp(y(51))^(params(37)*(-exp(y(66))));
T331 = params(36)^((1-params(37))*(-exp(y(66))));
T332 = T329*T331;
T335 = exp(y(118))^exp(y(66));
T339 = T332*T335*exp(y(119));
T345 = params(1)*params(26)*exp(y(51))^((1-exp(y(66)))*params(37));
T347 = params(36)^((1-exp(y(66)))*(1-params(37)));
T348 = T345*T347;
T349 = exp(y(118))^(exp(y(66))-1);
T353 = T348*T349*exp(y(120));
T362 = exp(y(113))*exp(y(55))/exp(y(118))*exp(y(64));
T367 = exp(y(11))^params(24);
T370 = (exp(y(51))/params(36))^params(22);
T378 = exp(y(38))*exp(y(69))^params(25)/exp(y(88));
T384 = params(1)*params(32)^(-1);
T385 = params(36)*T370*T378^params(23)/T384;
T407 = params(32)*T191*exp(y(51))^(-1)*exp(y(19));
T411 = params(36)^(1-params(29));
T412 = exp(y(10))^params(29)*T411;
T413 = T407*T412;
T425 = params(28)/(params(28)-1)*exp(y(72))/exp(y(73));
T444 = params(32)*params(1)*params(27)*exp(y(29))^(-1)*T411*exp(y(51))^params(29);
T445 = exp(y(118))^(-1);
T452 = exp(y(71))/exp(y(70));
T455 = exp(y(42))*T452^(-params(28));
T544 = params(11)*exp(y(62))*exp(y(79))^(1-params(8))*exp(y(81))^params(8);
T575 = exp(y(20))*exp(y(100))/exp(y(28));
T577 = T575*y(102);
T582 = exp(y(77))*exp(y(136))/exp(y(100));
T601 = exp(y(88))*T97*1/exp(y(89));
T606 = exp(y(81))/exp(y(79));
T611 = exp(y(63))*T606^(1-params(8))*exp(y(99));
T618 = exp(y(20))*exp(y(81))/exp(y(23));
T620 = T618*y(104);
T625 = exp(y(77))*exp(y(126))/exp(y(81));
T634 = exp(y(128))*params(7)*params(31)*params(30)*exp(y(81))^params(17);
T646 = exp(y(24))/exp(y(20));
T651 = exp(y(92))^(1-params(2));
T652 = exp(y(68))*T646^params(2)*T651;
T676 = params(1)*exp(y(95))/exp(y(27))*exp(y(20))^(-1);
T698 = (1-params(2))*T214*1/exp(y(89))*exp(y(88))/exp(y(92));
T710 = exp(y(20))*exp(y(94))/exp(y(26));
T717 = exp(y(77))*exp(y(134))/exp(y(94));
T733 = params(2)*(params(6)-1)*exp(y(77))*exp(y(130))/(params(6)*exp(y(82))*exp(y(131)));
T771 = params(28)/(params(28)-1)*params(5)*exp(y(92))^params(3);
T806 = (-(exp(y(1))*exp(y(7))))/(exp(y(1))*exp(y(1)));
T820 = getPowerDeriv(exp(y(39))-params(43)*exp(y(5))/exp(y(1)),(-1),1);
T848 = getPowerDeriv(T413,1-params(28),1);
T863 = getPowerDeriv(exp(y(29))*exp(y(112))-exp(y(39))*params(43),(-1),1);
T941 = (-(exp(y(1))*exp(y(37))*exp(y(4))))/(exp(y(4))*exp(y(4)));
T984 = getPowerDeriv(T385,1-params(24),1);
T1041 = (-(exp(y(113))*(-(params(2)*exp(y(29))*(params(6)-1)*exp(y(111))*params(6)*exp(y(43))*exp(y(117))))/(params(6)*exp(y(43))*exp(y(117))*params(6)*exp(y(43))*exp(y(117)))));
T1048 = (-(exp(y(1))*exp(y(45))*exp(y(8))))/(exp(y(8))*exp(y(8)));
T1068 = (-(T109^(1-params(8))*exp(y(63))*exp(y(47))));
T1072 = (-(exp(y(1))*exp(y(48))*exp(y(9))))/(exp(y(9))*exp(y(9)));
T1092 = (-exp(y(50)))/(exp(y(50))*exp(y(50)));
T1217 = (-(exp(y(64))*exp(y(128))*exp(y(97))/params(36)));
T1325 = (-(exp(y(20))*exp(y(24))))/(exp(y(20))*exp(y(20)));
T1339 = getPowerDeriv(exp(y(93))-params(43)*exp(y(25))/exp(y(20)),(-1),1);
T1377 = getPowerDeriv(exp(y(77))*exp(y(133))-params(43)*exp(y(93)),(-1),1);
T1417 = (-(exp(y(20))*exp(y(81))*exp(y(23))))/(exp(y(23))*exp(y(23)));
T1461 = (-(exp(y(128))*(-(params(2)*(params(6)-1)*exp(y(77))*exp(y(130))*params(6)*exp(y(82))*exp(y(131))))/(params(6)*exp(y(82))*exp(y(131))*params(6)*exp(y(82))*exp(y(131)))));
T1541 = (-(exp(y(20))*exp(y(94))*exp(y(26))))/(exp(y(26))*exp(y(26)));
T1577 = (-(exp(y(20))*exp(y(100))*exp(y(28))))/(exp(y(28))*exp(y(28)));
lhs =exp(y(29));
rhs =params(7)+exp(y(31))*params(7)*(exp(y(30))-1);
residual(1)= lhs-rhs;
lhs =exp(y(30))*exp(y(1));
rhs =params(7)*exp(y(2))+exp(y(3));
residual(2)= lhs-rhs;
lhs =exp(y(32));
rhs =T43;
residual(3)= lhs-rhs;
lhs =exp(y(34));
rhs =(-exp(y(33)))*exp(y(46))+params(7)*exp(y(113))*(exp(y(31))*exp(y(109))+(1-exp(y(31)))*exp(y(108)));
residual(4)= lhs-rhs;
lhs =exp(y(46));
rhs =1+y(58)+T76-exp(y(113))*T81^2*y(122);
residual(5)= lhs-rhs;
lhs =exp(y(35));
rhs =exp(y(36))+params(7)*exp(y(113))*exp(y(109));
residual(6)= lhs-rhs;
lhs =exp(y(36));
rhs =T104;
residual(7)= lhs-rhs;
lhs =exp(y(62))*params(11)*exp(y(113))*exp(y(108));
rhs =T109^(1-params(8))*exp(y(63))*exp(y(47));
residual(8)= lhs-rhs;
lhs =exp(y(47));
rhs =1+y(60)+T125-exp(y(113))*T130^2*y(123);
residual(9)= lhs-rhs;
lhs =T144*(exp(y(109))-exp(y(108)));
rhs =exp(y(46))*exp(y(33))^(1-params(31));
residual(10)= lhs-rhs;
lhs =exp(y(31));
rhs =params(30)*exp(y(37))^params(17)*exp(y(33))^params(31);
residual(11)= lhs-rhs;
lhs =exp(y(38));
rhs =exp(y(68))*T159^params(2)*T166;
residual(12)= lhs-rhs;
lhs =exp(y(38));
rhs =exp(y(39))+(1+y(56))*exp(y(45))+(1+y(58))*exp(y(48))+exp(y(37))*(1+y(60));
residual(13)= lhs-rhs;
lhs =exp(y(40));
rhs =params(1)*exp(y(41))/exp(y(6))*T191;
residual(14)= lhs-rhs;
lhs =exp(y(41));
rhs =(exp(y(39))-params(43)*exp(y(5))/exp(y(1)))^(-1)-params(1)*params(43)*(exp(y(29))*exp(y(112))-exp(y(39))*params(43))^(-1);
residual(15)= lhs-rhs;
lhs =exp(y(70));
rhs =T218;
residual(16)= lhs-rhs;
lhs =exp(y(43));
rhs =exp(y(45))+T159*(1-params(4));
residual(17)= lhs-rhs;
lhs =exp(y(44));
rhs =1+y(56)+T234-exp(y(113))*T239^2*y(121);
residual(18)= lhs-rhs;
lhs =exp(y(44));
rhs =exp(y(113))*(T255+(1-params(4))*exp(y(114)));
residual(19)= lhs-rhs;
lhs =exp(y(48));
rhs =(exp(y(30))-1)*exp(y(33));
residual(20)= lhs-rhs;
lhs =y(56);
rhs =T265*(T232-params(32))^2;
residual(21)= lhs-rhs;
lhs =y(57);
rhs =params(14)*(T232-params(32));
residual(22)= lhs-rhs;
lhs =y(58);
rhs =T274*(T74-params(32))^2;
residual(23)= lhs-rhs;
lhs =y(59);
rhs =params(15)*(T74-params(32));
residual(24)= lhs-rhs;
lhs =y(60);
rhs =T282*(T123-params(32))^2;
residual(25)= lhs-rhs;
lhs =y(61);
rhs =params(16)*(T123-params(32));
residual(26)= lhs-rhs;
lhs =exp(y(51))^(1-exp(y(66)));
rhs =params(26)*T303^(1-exp(y(66)))+(1-params(26))*exp(y(52))^(1-exp(y(66)));
residual(27)= lhs-rhs;
lhs =exp(y(52));
rhs =T321;
residual(28)= lhs-rhs;
lhs =exp(y(53));
rhs =exp(y(38))*1/exp(y(50))*exp(y(41))+T339;
residual(29)= lhs-rhs;
lhs =exp(y(54));
rhs =exp(y(38))*exp(y(41))+T353;
residual(30)= lhs-rhs;
lhs =1;
rhs =T362;
residual(31)= lhs-rhs;
lhs =exp(y(55));
rhs =T367*T385^(1-params(24))*exp(y(65));
residual(32)= lhs-rhs;
lhs =exp(y(70))^(1-params(28));
rhs =(1-params(27))*exp(y(71))^(1-params(28))+params(27)*T413^(1-params(28));
residual(33)= lhs-rhs;
lhs =exp(y(71));
rhs =T425;
residual(34)= lhs-rhs;
lhs =exp(y(72));
rhs =exp(y(41))*exp(y(74))*exp(y(75))+params(1)*params(27)*exp(y(124));
residual(35)= lhs-rhs;
lhs =exp(y(73));
rhs =exp(y(41))*exp(y(74))+T444*T445*exp(y(125));
residual(36)= lhs-rhs;
lhs =exp(y(74));
rhs =T455;
residual(37)= lhs-rhs;
lhs =exp(y(75));
rhs =params(5)*exp(y(74))^params(3)/exp(y(41));
residual(38)= lhs-rhs;
lhs =y(65);
rhs =params(19)*y(15)+params(18)*x(it_, 3);
residual(39)= lhs-rhs;
lhs =y(64);
rhs =params(21)*y(14)+params(20)*x(it_, 4);
residual(40)= lhs-rhs;
lhs =exp(y(66));
rhs =params(38)*exp(y(67));
residual(41)= lhs-rhs;
lhs =y(67);
rhs =params(39)*y(16)+params(40)*x(it_, 5);
residual(42)= lhs-rhs;
lhs =y(68);
rhs =params(41)*y(17)+params(42)*x(it_, 6);
residual(43)= lhs-rhs;
lhs =y(62);
rhs =params(9)*y(12)+params(10)*x(it_, 1);
residual(44)= lhs-rhs;
lhs =y(63);
rhs =params(12)*y(13)-params(13)*x(it_, 2);
residual(45)= lhs-rhs;
lhs =exp(y(77));
rhs =params(7)+params(7)*exp(y(78))*(exp(y(79))-1);
residual(46)= lhs-rhs;
lhs =exp(y(79))*exp(y(20));
rhs =params(7)*exp(y(21))+exp(y(22));
residual(47)= lhs-rhs;
lhs =exp(y(80));
rhs =T544;
residual(48)= lhs-rhs;
lhs =exp(y(83));
rhs =(-exp(y(84)))*exp(y(98))+params(7)*exp(y(128))*(exp(y(78))*exp(y(129))+(1-exp(y(78)))*exp(y(127)));
residual(49)= lhs-rhs;
lhs =exp(y(98));
rhs =1+y(101)+T577-exp(y(128))*T582^2*y(137);
residual(50)= lhs-rhs;
lhs =exp(y(86));
rhs =exp(y(87))+params(7)*exp(y(128))*exp(y(129));
residual(51)= lhs-rhs;
lhs =exp(y(87));
rhs =T601;
residual(52)= lhs-rhs;
lhs =exp(y(62))*params(11)*exp(y(128))*exp(y(127));
rhs =T611;
residual(53)= lhs-rhs;
lhs =exp(y(99));
rhs =1+y(103)+T620-exp(y(128))*T625^2*y(138);
residual(54)= lhs-rhs;
lhs =T634*(exp(y(129))-exp(y(127)));
rhs =exp(y(98))*exp(y(84))^(1-params(31));
residual(55)= lhs-rhs;
lhs =exp(y(78));
rhs =params(30)*exp(y(81))^params(17)*exp(y(84))^params(31);
residual(56)= lhs-rhs;
lhs =exp(y(88));
rhs =T652;
residual(57)= lhs-rhs;
lhs =exp(y(88));
rhs =exp(y(93))+(1+y(91))*exp(y(94))+(1+y(101))*exp(y(100))+exp(y(81))*(1+y(103));
residual(58)= lhs-rhs;
lhs =exp(y(85));
rhs =T676;
residual(59)= lhs-rhs;
lhs =exp(y(95));
rhs =(exp(y(93))-params(43)*exp(y(25))/exp(y(20)))^(-1)-params(1)*params(43)*(exp(y(77))*exp(y(133))-params(43)*exp(y(93)))^(-1);
residual(60)= lhs-rhs;
lhs =exp(y(76));
rhs =T698;
residual(61)= lhs-rhs;
lhs =exp(y(82));
rhs =exp(y(94))+(1-params(4))*T646;
residual(62)= lhs-rhs;
lhs =exp(y(96));
rhs =1+y(91)+T710*y(90)-exp(y(128))*T717^2*y(132);
residual(63)= lhs-rhs;
lhs =exp(y(96));
rhs =exp(y(128))*(T733+(1-params(4))*exp(y(135)));
residual(64)= lhs-rhs;
lhs =exp(y(100));
rhs =(exp(y(79))-1)*exp(y(84));
residual(65)= lhs-rhs;
lhs =y(91);
rhs =T265*(T710-params(32))^2;
residual(66)= lhs-rhs;
lhs =y(90);
rhs =params(14)*(T710-params(32));
residual(67)= lhs-rhs;
lhs =y(101);
rhs =T274*(T575-params(32))^2;
residual(68)= lhs-rhs;
lhs =y(102);
rhs =params(15)*(T575-params(32));
residual(69)= lhs-rhs;
lhs =y(103);
rhs =T282*(T618-params(32))^2;
residual(70)= lhs-rhs;
lhs =y(104);
rhs =params(16)*(T618-params(32));
residual(71)= lhs-rhs;
lhs =exp(y(89));
rhs =params(38)/(params(38)-1);
residual(72)= lhs-rhs;
lhs =1;
rhs =exp(y(64))*exp(y(128))*exp(y(97))/params(36);
residual(73)= lhs-rhs;
lhs =exp(y(76));
rhs =T771*1/exp(y(95));
residual(74)= lhs-rhs;
lhs =exp(y(69));
rhs =exp(y(1))*exp(y(18))/exp(y(20));
residual(75)= lhs-rhs;
lhs =exp(y(49));
rhs =exp(y(43))*exp(y(44))+exp(y(35))-exp(y(36))+(exp(y(30))-1)*(exp(y(34))+exp(y(33))*exp(y(46)));
residual(76)= lhs-rhs;
lhs =exp(y(105));
rhs =exp(y(113))*exp(y(108));
residual(77)= lhs-rhs;
lhs =exp(y(106));
rhs =exp(y(113))*(exp(y(109))-exp(y(108)));
residual(78)= lhs-rhs;
lhs =exp(y(107));
rhs =exp(y(55))/exp(y(118));
residual(79)= lhs-rhs;
if nargout >= 2,
  g1 = zeros(79, 144);

  %
  % Jacobian matrix
  %

  g1(1,29)=exp(y(29));
  g1(1,30)=(-(exp(y(31))*params(7)*exp(y(30))));
  g1(1,31)=(-(exp(y(31))*params(7)*(exp(y(30))-1)));
  g1(2,1)=exp(y(30))*exp(y(1));
  g1(2,2)=(-(params(7)*exp(y(2))));
  g1(2,30)=exp(y(30))*exp(y(1));
  g1(2,3)=(-exp(y(3)));
  g1(3,30)=(-(exp(y(37))^params(8)*params(11)*exp(y(62))*exp(y(30))*getPowerDeriv(exp(y(30)),1-params(8),1)));
  g1(3,32)=exp(y(32));
  g1(3,37)=(-(params(11)*exp(y(62))*exp(y(30))^(1-params(8))*exp(y(37))*getPowerDeriv(exp(y(37)),params(8),1)));
  g1(3,62)=(-T43);
  g1(4,31)=(-(params(7)*exp(y(113))*(exp(y(31))*exp(y(109))+exp(y(108))*(-exp(y(31))))));
  g1(4,33)=(-((-exp(y(33)))*exp(y(46))));
  g1(4,34)=exp(y(34));
  g1(4,108)=(-(params(7)*exp(y(113))*(1-exp(y(31)))*exp(y(108))));
  g1(4,109)=(-(params(7)*exp(y(113))*exp(y(31))*exp(y(109))));
  g1(4,113)=(-(params(7)*exp(y(113))*(exp(y(31))*exp(y(109))+(1-exp(y(31)))*exp(y(108)))));
  g1(4,46)=(-((-exp(y(33)))*exp(y(46))));
  g1(5,1)=(-T76);
  g1(5,29)=y(122)*exp(y(113))*T81*2*T81;
  g1(5,113)=exp(y(113))*T81^2*y(122);
  g1(5,46)=exp(y(46));
  g1(5,9)=(-(y(59)*T1072));
  g1(5,48)=(-(T76-y(122)*exp(y(113))*2*T81*(-(exp(y(48))*exp(y(29))*exp(y(116))))/(exp(y(48))*exp(y(48)))));
  g1(5,116)=y(122)*exp(y(113))*T81*2*T81;
  g1(5,58)=(-1);
  g1(5,59)=(-T74);
  g1(5,122)=exp(y(113))*T81^2;
  g1(6,35)=exp(y(35));
  g1(6,109)=(-(params(7)*exp(y(113))*exp(y(109))));
  g1(6,36)=(-exp(y(36)));
  g1(6,113)=(-(params(7)*exp(y(113))*exp(y(109))));
  g1(7,36)=exp(y(36));
  g1(7,38)=(-T104);
  g1(7,50)=(-(exp(y(38))*T97*T1092));
  g1(8,30)=(-(exp(y(47))*exp(y(63))*(-(exp(y(30))*exp(y(37))))/(exp(y(30))*exp(y(30)))*getPowerDeriv(T109,1-params(8),1)));
  g1(8,108)=exp(y(62))*params(11)*exp(y(113))*exp(y(108));
  g1(8,37)=(-(exp(y(47))*exp(y(63))*T109*getPowerDeriv(T109,1-params(8),1)));
  g1(8,113)=exp(y(62))*params(11)*exp(y(113))*exp(y(108));
  g1(8,47)=T1068;
  g1(8,62)=exp(y(62))*params(11)*exp(y(113))*exp(y(108));
  g1(8,63)=T1068;
  g1(9,1)=(-T125);
  g1(9,29)=y(123)*exp(y(113))*T130*2*T130;
  g1(9,4)=(-(y(61)*T941));
  g1(9,37)=(-(T125-y(123)*exp(y(113))*2*T130*(-(exp(y(37))*exp(y(29))*exp(y(110))))/(exp(y(37))*exp(y(37)))));
  g1(9,110)=y(123)*exp(y(113))*T130*2*T130;
  g1(9,113)=exp(y(113))*T130^2*y(123);
  g1(9,47)=exp(y(47));
  g1(9,60)=(-1);
  g1(9,61)=(-T123);
  g1(9,123)=exp(y(113))*T130^2;
  g1(10,33)=(-(exp(y(46))*exp(y(33))*getPowerDeriv(exp(y(33)),1-params(31),1)));
  g1(10,108)=T144*(-exp(y(108)));
  g1(10,109)=exp(y(109))*T144;
  g1(10,37)=(exp(y(109))-exp(y(108)))*exp(y(113))*params(7)*params(31)*params(30)*exp(y(37))*getPowerDeriv(exp(y(37)),params(17),1);
  g1(10,113)=T144*(exp(y(109))-exp(y(108)));
  g1(10,46)=(-(exp(y(46))*exp(y(33))^(1-params(31))));
  g1(11,31)=exp(y(31));
  g1(11,33)=(-(params(30)*exp(y(37))^params(17)*exp(y(33))*getPowerDeriv(exp(y(33)),params(31),1)));
  g1(11,37)=(-(exp(y(33))^params(31)*params(30)*exp(y(37))*getPowerDeriv(exp(y(37)),params(17),1)));
  g1(12,1)=(-(T166*exp(y(68))*T806*getPowerDeriv(T159,params(2),1)));
  g1(12,38)=exp(y(38));
  g1(12,42)=(-(exp(y(68))*T159^params(2)*exp(y(42))*getPowerDeriv(exp(y(42)),1-params(2),1)));
  g1(12,7)=(-(T166*exp(y(68))*T159*getPowerDeriv(T159,params(2),1)));
  g1(12,68)=(-(exp(y(68))*T159^params(2)*T166));
  g1(13,37)=(-(exp(y(37))*(1+y(60))));
  g1(13,38)=exp(y(38));
  g1(13,39)=(-exp(y(39)));
  g1(13,45)=(-((1+y(56))*exp(y(45))));
  g1(13,48)=(-((1+y(58))*exp(y(48))));
  g1(13,56)=(-exp(y(45)));
  g1(13,58)=(-exp(y(48)));
  g1(13,60)=(-exp(y(37)));
  g1(14,1)=(-(params(1)*exp(y(41))/exp(y(6))*exp(y(1))*getPowerDeriv(exp(y(1)),(-1),1)));
  g1(14,40)=exp(y(40));
  g1(14,6)=(-(T191*(-(params(1)*exp(y(41))*exp(y(6))))/(exp(y(6))*exp(y(6)))));
  g1(14,41)=(-(params(1)*exp(y(41))/exp(y(6))*T191));
  g1(15,1)=(-((-((-(exp(y(1))*params(43)*exp(y(5))))/(exp(y(1))*exp(y(1)))))*T820));
  g1(15,29)=params(1)*params(43)*exp(y(29))*exp(y(112))*T863;
  g1(15,5)=(-(T820*(-(params(43)*exp(y(5))/exp(y(1))))));
  g1(15,39)=(-(exp(y(39))*T820-params(1)*params(43)*T863*(-(exp(y(39))*params(43)))));
  g1(15,112)=params(1)*params(43)*exp(y(29))*exp(y(112))*T863;
  g1(15,41)=exp(y(41));
  g1(16,38)=(-T218);
  g1(16,42)=(-(T216*(-(exp(y(38))*exp(y(42))))/(exp(y(42))*exp(y(42)))));
  g1(16,50)=(-(exp(y(38))/exp(y(42))*(1-params(2))*T214*T1092));
  g1(16,70)=exp(y(70));
  g1(17,1)=(-((1-params(4))*T806));
  g1(17,7)=(-(T159*(1-params(4))));
  g1(17,43)=exp(y(43));
  g1(17,45)=(-exp(y(45)));
  g1(18,1)=(-T234);
  g1(18,29)=y(121)*exp(y(113))*T239*2*T239;
  g1(18,113)=exp(y(113))*T239^2*y(121);
  g1(18,44)=exp(y(44));
  g1(18,8)=(-(y(57)*T1048));
  g1(18,45)=(-(T234-y(121)*exp(y(113))*2*T239*(-(exp(y(45))*exp(y(29))*exp(y(115))))/(exp(y(45))*exp(y(45)))));
  g1(18,115)=y(121)*exp(y(113))*T239*2*T239;
  g1(18,56)=(-1);
  g1(18,57)=(-T232);
  g1(18,121)=exp(y(113))*T239^2;
  g1(19,29)=(-(exp(y(113))*T255));
  g1(19,111)=(-(exp(y(113))*T255));
  g1(19,113)=(-(exp(y(113))*(T255+(1-params(4))*exp(y(114)))));
  g1(19,43)=T1041;
  g1(19,44)=exp(y(44));
  g1(19,114)=(-(exp(y(113))*(1-params(4))*exp(y(114))));
  g1(19,117)=T1041;
  g1(20,30)=(-(exp(y(30))*exp(y(33))));
  g1(20,33)=(-((exp(y(30))-1)*exp(y(33))));
  g1(20,48)=exp(y(48));
  g1(21,1)=(-(T265*T232*2*(T232-params(32))));
  g1(21,8)=(-(T265*2*(T232-params(32))*T1048));
  g1(21,45)=(-(T265*T232*2*(T232-params(32))));
  g1(21,56)=1;
  g1(22,1)=(-(T232*params(14)));
  g1(22,8)=(-(params(14)*T1048));
  g1(22,45)=(-(T232*params(14)));
  g1(22,57)=1;
  g1(23,1)=(-(T274*T74*2*(T74-params(32))));
  g1(23,9)=(-(T274*2*(T74-params(32))*T1072));
  g1(23,48)=(-(T274*T74*2*(T74-params(32))));
  g1(23,58)=1;
  g1(24,1)=(-(T74*params(15)));
  g1(24,9)=(-(params(15)*T1072));
  g1(24,48)=(-(T74*params(15)));
  g1(24,59)=1;
  g1(25,1)=(-(T282*T123*2*(T123-params(32))));
  g1(25,4)=(-(T282*2*(T123-params(32))*T941));
  g1(25,37)=(-(T282*T123*2*(T123-params(32))));
  g1(25,60)=1;
  g1(26,1)=(-(T123*params(16)));
  g1(26,4)=(-(params(16)*T941));
  g1(26,37)=(-(T123*params(16)));
  g1(26,61)=1;
  g1(27,10)=(-(params(26)*params(36)^(1-params(37))*exp(y(10))*getPowerDeriv(exp(y(10)),params(37),1)*getPowerDeriv(T303,1-exp(y(66)),1)));
  g1(27,51)=exp(y(51))*getPowerDeriv(exp(y(51)),1-exp(y(66)),1);
  g1(27,52)=(-((1-params(26))*exp(y(52))*getPowerDeriv(exp(y(52)),1-exp(y(66)),1)));
  g1(27,66)=exp(y(51))^(1-exp(y(66)))*(-exp(y(66)))*log(exp(y(51)))-(params(26)*T303^(1-exp(y(66)))*(-exp(y(66)))*log(T303)+(1-params(26))*exp(y(52))^(1-exp(y(66)))*(-exp(y(66)))*log(exp(y(52))));
  g1(28,51)=(-T321);
  g1(28,52)=exp(y(52));
  g1(28,53)=(-T321);
  g1(28,54)=(-(exp(y(51))*exp(y(66))/(exp(y(66))-1)*(-(exp(y(53))*exp(y(54))))/(exp(y(54))*exp(y(54)))));
  g1(28,66)=(-(exp(y(51))*exp(y(53))/exp(y(54))*(exp(y(66))*(exp(y(66))-1)-exp(y(66))*exp(y(66)))/((exp(y(66))-1)*(exp(y(66))-1))));
  g1(29,38)=(-(exp(y(38))*1/exp(y(50))*exp(y(41))));
  g1(29,41)=(-(exp(y(38))*1/exp(y(50))*exp(y(41))));
  g1(29,50)=(-(exp(y(38))*exp(y(41))*T1092));
  g1(29,51)=(-(exp(y(119))*T335*T331*params(1)*params(26)*exp(y(51))*getPowerDeriv(exp(y(51)),params(37)*(-exp(y(66))),1)));
  g1(29,118)=(-(exp(y(119))*T332*exp(y(118))*getPowerDeriv(exp(y(118)),exp(y(66)),1)));
  g1(29,53)=exp(y(53));
  g1(29,119)=(-T339);
  g1(29,66)=(-(exp(y(119))*(T335*(T331*params(1)*params(26)*exp(y(51))^(params(37)*(-exp(y(66))))*params(37)*(-exp(y(66)))*log(exp(y(51)))+T329*T331*(1-params(37))*(-exp(y(66)))*log(params(36)))+T332*T335*exp(y(66))*log(exp(y(118))))));
  g1(30,38)=(-(exp(y(38))*exp(y(41))));
  g1(30,41)=(-(exp(y(38))*exp(y(41))));
  g1(30,51)=(-(exp(y(120))*T349*T347*params(1)*params(26)*exp(y(51))*getPowerDeriv(exp(y(51)),(1-exp(y(66)))*params(37),1)));
  g1(30,118)=(-(exp(y(120))*T348*exp(y(118))*getPowerDeriv(exp(y(118)),exp(y(66))-1,1)));
  g1(30,54)=exp(y(54));
  g1(30,120)=(-T353);
  g1(30,66)=(-(exp(y(120))*(T349*(T347*params(1)*params(26)*exp(y(51))^((1-exp(y(66)))*params(37))*params(37)*(-exp(y(66)))*log(exp(y(51)))+T345*T347*(1-params(37))*(-exp(y(66)))*log(params(36)))+T348*T349*exp(y(66))*log(exp(y(118))))));
  g1(31,113)=(-T362);
  g1(31,118)=(-(exp(y(64))*(-(exp(y(118))*exp(y(113))*exp(y(55))))/(exp(y(118))*exp(y(118)))));
  g1(31,55)=(-T362);
  g1(31,64)=(-T362);
  g1(32,38)=(-(exp(y(65))*T367*params(36)*T370*T378*getPowerDeriv(T378,params(23),1)/T384*T984));
  g1(32,51)=(-(exp(y(65))*T367*T984*params(36)*T378^params(23)*exp(y(51))/params(36)*getPowerDeriv(exp(y(51))/params(36),params(22),1)/T384));
  g1(32,11)=(-(exp(y(65))*T385^(1-params(24))*exp(y(11))*getPowerDeriv(exp(y(11)),params(24),1)));
  g1(32,55)=exp(y(55));
  g1(32,65)=(-(T367*T385^(1-params(24))*exp(y(65))));
  g1(32,69)=(-(exp(y(65))*T367*T984*params(36)*T370*getPowerDeriv(T378,params(23),1)*exp(y(38))*exp(y(69))*getPowerDeriv(exp(y(69)),params(25),1)/exp(y(88))/T384));
  g1(32,88)=(-(exp(y(65))*T367*T984*params(36)*T370*getPowerDeriv(T378,params(23),1)*(-(exp(y(38))*exp(y(69))^params(25)*exp(y(88))))/(exp(y(88))*exp(y(88)))/T384));
  g1(33,1)=(-(params(27)*T412*params(32)*exp(y(19))*exp(y(51))^(-1)*exp(y(1))*getPowerDeriv(exp(y(1)),(-1),1)*T848));
  g1(33,10)=(-(params(27)*T848*T407*T411*exp(y(10))*getPowerDeriv(exp(y(10)),params(29),1)));
  g1(33,51)=(-(params(27)*T848*T412*params(32)*exp(y(19))*T191*exp(y(51))*getPowerDeriv(exp(y(51)),(-1),1)));
  g1(33,19)=(-(params(27)*T413*T848));
  g1(33,70)=exp(y(70))*getPowerDeriv(exp(y(70)),1-params(28),1);
  g1(33,71)=(-((1-params(27))*exp(y(71))*getPowerDeriv(exp(y(71)),1-params(28),1)));
  g1(34,71)=exp(y(71));
  g1(34,72)=(-T425);
  g1(34,73)=(-((-(params(28)/(params(28)-1)*exp(y(72))*exp(y(73))))/(exp(y(73))*exp(y(73)))));
  g1(35,41)=(-(exp(y(41))*exp(y(74))*exp(y(75))));
  g1(35,72)=exp(y(72));
  g1(35,124)=(-(params(1)*params(27)*exp(y(124))));
  g1(35,74)=(-(exp(y(41))*exp(y(74))*exp(y(75))));
  g1(35,75)=(-(exp(y(41))*exp(y(74))*exp(y(75))));
  g1(36,29)=(-(exp(y(125))*T445*T411*exp(y(51))^params(29)*params(32)*params(1)*params(27)*exp(y(29))*getPowerDeriv(exp(y(29)),(-1),1)));
  g1(36,41)=(-(exp(y(41))*exp(y(74))));
  g1(36,51)=(-(exp(y(125))*T445*params(32)*params(1)*params(27)*exp(y(29))^(-1)*T411*exp(y(51))*getPowerDeriv(exp(y(51)),params(29),1)));
  g1(36,118)=(-(exp(y(125))*T444*exp(y(118))*getPowerDeriv(exp(y(118)),(-1),1)));
  g1(36,73)=exp(y(73));
  g1(36,125)=(-(T444*T445*exp(y(125))));
  g1(36,74)=(-(exp(y(41))*exp(y(74))));
  g1(37,42)=(-T455);
  g1(37,70)=(-(exp(y(42))*(-(exp(y(70))*exp(y(71))))/(exp(y(70))*exp(y(70)))*getPowerDeriv(T452,(-params(28)),1)));
  g1(37,71)=(-(exp(y(42))*T452*getPowerDeriv(T452,(-params(28)),1)));
  g1(37,74)=exp(y(74));
  g1(38,41)=(-((-(exp(y(41))*params(5)*exp(y(74))^params(3)))/(exp(y(41))*exp(y(41)))));
  g1(38,74)=(-(params(5)*exp(y(74))*getPowerDeriv(exp(y(74)),params(3),1)/exp(y(41))));
  g1(38,75)=exp(y(75));
  g1(39,15)=(-params(19));
  g1(39,65)=1;
  g1(39,141)=(-params(18));
  g1(40,14)=(-params(21));
  g1(40,64)=1;
  g1(40,142)=(-params(20));
  g1(41,66)=exp(y(66));
  g1(41,67)=(-(params(38)*exp(y(67))));
  g1(42,16)=(-params(39));
  g1(42,67)=1;
  g1(42,143)=(-params(40));
  g1(43,17)=(-params(41));
  g1(43,68)=1;
  g1(43,144)=(-params(42));
  g1(44,12)=(-params(9));
  g1(44,62)=1;
  g1(44,139)=(-params(10));
  g1(45,13)=(-params(12));
  g1(45,63)=1;
  g1(45,140)=params(13);
  g1(46,77)=exp(y(77));
  g1(46,78)=(-(params(7)*exp(y(78))*(exp(y(79))-1)));
  g1(46,79)=(-(params(7)*exp(y(78))*exp(y(79))));
  g1(47,20)=exp(y(79))*exp(y(20));
  g1(47,21)=(-(params(7)*exp(y(21))));
  g1(47,79)=exp(y(79))*exp(y(20));
  g1(47,22)=(-exp(y(22)));
  g1(48,62)=(-T544);
  g1(48,79)=(-(exp(y(81))^params(8)*params(11)*exp(y(62))*exp(y(79))*getPowerDeriv(exp(y(79)),1-params(8),1)));
  g1(48,80)=exp(y(80));
  g1(48,81)=(-(params(11)*exp(y(62))*exp(y(79))^(1-params(8))*exp(y(81))*getPowerDeriv(exp(y(81)),params(8),1)));
  g1(49,78)=(-(params(7)*exp(y(128))*(exp(y(78))*exp(y(129))+exp(y(127))*(-exp(y(78))))));
  g1(49,83)=exp(y(83));
  g1(49,127)=(-(params(7)*exp(y(128))*(1-exp(y(78)))*exp(y(127))));
  g1(49,84)=(-((-exp(y(84)))*exp(y(98))));
  g1(49,128)=(-(params(7)*exp(y(128))*(exp(y(78))*exp(y(129))+(1-exp(y(78)))*exp(y(127)))));
  g1(49,129)=(-(params(7)*exp(y(128))*exp(y(78))*exp(y(129))));
  g1(49,98)=(-((-exp(y(84)))*exp(y(98))));
  g1(50,20)=(-T577);
  g1(50,77)=y(137)*exp(y(128))*T582*2*T582;
  g1(50,128)=exp(y(128))*T582^2*y(137);
  g1(50,98)=exp(y(98));
  g1(50,28)=(-(y(102)*T1577));
  g1(50,100)=(-(T577-y(137)*exp(y(128))*2*T582*(-(exp(y(100))*exp(y(77))*exp(y(136))))/(exp(y(100))*exp(y(100)))));
  g1(50,136)=y(137)*exp(y(128))*T582*2*T582;
  g1(50,101)=(-1);
  g1(50,102)=(-T575);
  g1(50,137)=exp(y(128))*T582^2;
  g1(51,128)=(-(params(7)*exp(y(128))*exp(y(129))));
  g1(51,86)=exp(y(86));
  g1(51,129)=(-(params(7)*exp(y(128))*exp(y(129))));
  g1(51,87)=(-exp(y(87)));
  g1(52,87)=exp(y(87));
  g1(52,88)=(-T601);
  g1(52,89)=(-(exp(y(88))*T97*(-exp(y(89)))/(exp(y(89))*exp(y(89)))));
  g1(53,62)=exp(y(62))*params(11)*exp(y(128))*exp(y(127));
  g1(53,63)=(-T611);
  g1(53,79)=(-(exp(y(99))*exp(y(63))*(-(exp(y(79))*exp(y(81))))/(exp(y(79))*exp(y(79)))*getPowerDeriv(T606,1-params(8),1)));
  g1(53,81)=(-(exp(y(99))*exp(y(63))*T606*getPowerDeriv(T606,1-params(8),1)));
  g1(53,127)=exp(y(62))*params(11)*exp(y(128))*exp(y(127));
  g1(53,128)=exp(y(62))*params(11)*exp(y(128))*exp(y(127));
  g1(53,99)=(-T611);
  g1(54,20)=(-T620);
  g1(54,77)=y(138)*exp(y(128))*T625*2*T625;
  g1(54,23)=(-(y(104)*T1417));
  g1(54,81)=(-(T620-y(138)*exp(y(128))*2*T625*(-(exp(y(81))*exp(y(77))*exp(y(126))))/(exp(y(81))*exp(y(81)))));
  g1(54,126)=y(138)*exp(y(128))*T625*2*T625;
  g1(54,128)=exp(y(128))*T625^2*y(138);
  g1(54,99)=exp(y(99));
  g1(54,103)=(-1);
  g1(54,104)=(-T618);
  g1(54,138)=exp(y(128))*T625^2;
  g1(55,81)=(exp(y(129))-exp(y(127)))*exp(y(128))*params(7)*params(31)*params(30)*exp(y(81))*getPowerDeriv(exp(y(81)),params(17),1);
  g1(55,127)=T634*(-exp(y(127)));
  g1(55,84)=(-(exp(y(98))*exp(y(84))*getPowerDeriv(exp(y(84)),1-params(31),1)));
  g1(55,128)=T634*(exp(y(129))-exp(y(127)));
  g1(55,129)=exp(y(129))*T634;
  g1(55,98)=(-(exp(y(98))*exp(y(84))^(1-params(31))));
  g1(56,78)=exp(y(78));
  g1(56,81)=(-(exp(y(84))^params(31)*params(30)*exp(y(81))*getPowerDeriv(exp(y(81)),params(17),1)));
  g1(56,84)=(-(params(30)*exp(y(81))^params(17)*exp(y(84))*getPowerDeriv(exp(y(84)),params(31),1)));
  g1(57,68)=(-T652);
  g1(57,20)=(-(T651*exp(y(68))*T1325*getPowerDeriv(T646,params(2),1)));
  g1(57,24)=(-(T651*exp(y(68))*T646*getPowerDeriv(T646,params(2),1)));
  g1(57,88)=exp(y(88));
  g1(57,92)=(-(exp(y(68))*T646^params(2)*exp(y(92))*getPowerDeriv(exp(y(92)),1-params(2),1)));
  g1(58,81)=(-(exp(y(81))*(1+y(103))));
  g1(58,88)=exp(y(88));
  g1(58,91)=(-exp(y(94)));
  g1(58,93)=(-exp(y(93)));
  g1(58,94)=(-((1+y(91))*exp(y(94))));
  g1(58,100)=(-((1+y(101))*exp(y(100))));
  g1(58,101)=(-exp(y(100)));
  g1(58,103)=(-exp(y(81)));
  g1(59,20)=(-(params(1)*exp(y(95))/exp(y(27))*exp(y(20))*getPowerDeriv(exp(y(20)),(-1),1)));
  g1(59,85)=exp(y(85));
  g1(59,27)=(-(exp(y(20))^(-1)*(-(params(1)*exp(y(95))*exp(y(27))))/(exp(y(27))*exp(y(27)))));
  g1(59,95)=(-T676);
  g1(60,20)=(-((-((-(exp(y(20))*params(43)*exp(y(25))))/(exp(y(20))*exp(y(20)))))*T1339));
  g1(60,77)=params(1)*params(43)*exp(y(77))*exp(y(133))*T1377;
  g1(60,25)=(-(T1339*(-(params(43)*exp(y(25))/exp(y(20))))));
  g1(60,93)=(-(exp(y(93))*T1339-params(1)*params(43)*T1377*(-(params(43)*exp(y(93))))));
  g1(60,133)=params(1)*params(43)*exp(y(77))*exp(y(133))*T1377;
  g1(60,95)=exp(y(95));
  g1(61,76)=exp(y(76));
  g1(61,88)=(-T698);
  g1(61,89)=(-(exp(y(88))/exp(y(92))*(1-params(2))*T214*(-exp(y(89)))/(exp(y(89))*exp(y(89)))));
  g1(61,92)=(-((1-params(2))*T214*1/exp(y(89))*(-(exp(y(88))*exp(y(92))))/(exp(y(92))*exp(y(92)))));
  g1(62,20)=(-((1-params(4))*T1325));
  g1(62,24)=(-((1-params(4))*T646));
  g1(62,82)=exp(y(82));
  g1(62,94)=(-exp(y(94)));
  g1(63,20)=(-(T710*y(90)));
  g1(63,77)=y(132)*exp(y(128))*T717*2*T717;
  g1(63,128)=exp(y(128))*T717^2*y(132);
  g1(63,90)=(-T710);
  g1(63,132)=exp(y(128))*T717^2;
  g1(63,91)=(-1);
  g1(63,26)=(-(y(90)*T1541));
  g1(63,94)=(-(T710*y(90)-y(132)*exp(y(128))*2*T717*(-(exp(y(94))*exp(y(77))*exp(y(134))))/(exp(y(94))*exp(y(94)))));
  g1(63,134)=y(132)*exp(y(128))*T717*2*T717;
  g1(63,96)=exp(y(96));
  g1(64,77)=(-(exp(y(128))*T733));
  g1(64,82)=T1461;
  g1(64,128)=(-(exp(y(128))*(T733+(1-params(4))*exp(y(135)))));
  g1(64,130)=(-(exp(y(128))*T733));
  g1(64,131)=T1461;
  g1(64,96)=exp(y(96));
  g1(64,135)=(-(exp(y(128))*(1-params(4))*exp(y(135))));
  g1(65,79)=(-(exp(y(79))*exp(y(84))));
  g1(65,84)=(-((exp(y(79))-1)*exp(y(84))));
  g1(65,100)=exp(y(100));
  g1(66,20)=(-(T265*T710*2*(T710-params(32))));
  g1(66,91)=1;
  g1(66,26)=(-(T265*2*(T710-params(32))*T1541));
  g1(66,94)=(-(T265*T710*2*(T710-params(32))));
  g1(67,20)=(-(params(14)*T710));
  g1(67,90)=1;
  g1(67,26)=(-(params(14)*T1541));
  g1(67,94)=(-(params(14)*T710));
  g1(68,20)=(-(T274*T575*2*(T575-params(32))));
  g1(68,28)=(-(T274*2*(T575-params(32))*T1577));
  g1(68,100)=(-(T274*T575*2*(T575-params(32))));
  g1(68,101)=1;
  g1(69,20)=(-(params(15)*T575));
  g1(69,28)=(-(params(15)*T1577));
  g1(69,100)=(-(params(15)*T575));
  g1(69,102)=1;
  g1(70,20)=(-(T282*T618*2*(T618-params(32))));
  g1(70,23)=(-(T282*2*(T618-params(32))*T1417));
  g1(70,81)=(-(T282*T618*2*(T618-params(32))));
  g1(70,103)=1;
  g1(71,20)=(-(params(16)*T618));
  g1(71,23)=(-(params(16)*T1417));
  g1(71,81)=(-(params(16)*T618));
  g1(71,104)=1;
  g1(72,89)=exp(y(89));
  g1(73,64)=T1217;
  g1(73,128)=T1217;
  g1(73,97)=T1217;
  g1(74,76)=exp(y(76));
  g1(74,92)=(-(1/exp(y(95))*params(28)/(params(28)-1)*params(5)*exp(y(92))*getPowerDeriv(exp(y(92)),params(3),1)));
  g1(74,95)=(-(T771*(-exp(y(95)))/(exp(y(95))*exp(y(95)))));
  g1(75,1)=(-(exp(y(1))*exp(y(18))/exp(y(20))));
  g1(75,18)=(-(exp(y(1))*exp(y(18))/exp(y(20))));
  g1(75,69)=exp(y(69));
  g1(75,20)=(-((-(exp(y(20))*exp(y(1))*exp(y(18))))/(exp(y(20))*exp(y(20)))));
  g1(76,30)=(-(exp(y(30))*(exp(y(34))+exp(y(33))*exp(y(46)))));
  g1(76,33)=(-((exp(y(30))-1)*exp(y(33))*exp(y(46))));
  g1(76,34)=(-((exp(y(30))-1)*exp(y(34))));
  g1(76,35)=(-exp(y(35)));
  g1(76,36)=exp(y(36));
  g1(76,43)=(-(exp(y(43))*exp(y(44))));
  g1(76,44)=(-(exp(y(43))*exp(y(44))));
  g1(76,46)=(-((exp(y(30))-1)*exp(y(33))*exp(y(46))));
  g1(76,49)=exp(y(49));
  g1(77,108)=(-(exp(y(113))*exp(y(108))));
  g1(77,113)=(-(exp(y(113))*exp(y(108))));
  g1(77,105)=exp(y(105));
  g1(78,108)=(-(exp(y(113))*(-exp(y(108)))));
  g1(78,109)=(-(exp(y(113))*exp(y(109))));
  g1(78,113)=(-(exp(y(113))*(exp(y(109))-exp(y(108)))));
  g1(78,106)=exp(y(106));
  g1(79,118)=(-((-(exp(y(118))*exp(y(55))))/(exp(y(118))*exp(y(118)))));
  g1(79,55)=(-(exp(y(55))/exp(y(118))));
  g1(79,107)=exp(y(107));
end
if nargout >= 3,
  %
  % Hessian matrix
  %

  g2 = sparse([],[],[],79,20736);
end
if nargout >= 4,
  %
  % Third order derivatives
  %

  g3 = sparse([],[],[],79,2985984);
end
end
